package com.peace.hospital.mapper;


import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.peace.hospital.entity.hospitalization.entity.Inpatientmessage;
import com.peace.hospital.entity.hospitalization.entity.Sickroo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Update;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author xie
 * @since 2019-11-12
 */
@Mapper
public interface SickrooMapper extends BaseMapper<Sickroo> {


    /**
     * 修改病房剩余床位数
     * @param i
     * @return
     */
    @Update({"UPDATE hospitalization.sickroo" +
            "SET sisurplusnum = sisurplusnum + 1" +
            "WHERE #{i.sicid} = 1"})
 int innerPeople(Inpatientmessage i);

}
